Attribute VB_Name = "mForm"
Option Explicit

Public g_sFFTableName As String

Public g_lFieldCount As Long
Public g_vEditData() As String
Public g_vEditDataColumn() As String
Public g_lEditDataCount As Long
Public g_bAddDataItem As Boolean
Public g_bFFReturn As Boolean
Public g_lFFAbsolutePosition As Long

Public Function ffEditTable(ByVal sTableName As String)
    g_bFFReturn = False
    Dim xTable As frmTable
    Set xTable = New frmTable
    g_sFFTableName = sTableName
    Load xTable
    xTable.Show vbModal
    ffEditTable = g_bFFReturn
End Function

Public Function ffAddTable()
    g_bFFReturn = False
    Dim xTable As frmTable
    Set xTable = New frmTable
    g_sFFTableName = ""
    Load xTable
    xTable.Show vbModal
    ffAddTable = g_bFFReturn
End Function

Public Function ffViewDataItem(ByVal sTableName As String)
    g_bFFReturn = False
    Dim xTable As frmDataItem
    Set xTable = New frmDataItem
    g_sFFTableName = sTableName
    g_lFieldCount = g_lEditDataCount
    g_bAddDataItem = False
    Load frmDataItem
    frmDataItem.Show vbModal
    ffViewDataItem = g_bFFReturn
End Function

Public Function ffAddDataItem(ByVal sTableName As String)
    g_bFFReturn = False
    Dim xTable As frmDataItem
    Set xTable = New frmDataItem
    g_sFFTableName = sTableName
    g_lFieldCount = g_lEditDataCount
    g_bAddDataItem = True
    Load frmDataItem
    frmDataItem.Show vbModal
    ffAddDataItem = g_bFFReturn
End Function

